import 'package:flutter/material.dart';

import 'sample_bloc_demo_home_widget.dart';

class SampleBloCDemoHome extends StatefulWidget {
  const SampleBloCDemoHome({Key? key}) : super(key: key);

  @override
  _SampleBloCDemoHomeState createState() => _SampleBloCDemoHomeState();
}

class _SampleBloCDemoHomeState extends State<SampleBloCDemoHome> {
  int _count = 0;

  increment() {
    setState(() {
      _count++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return CounterProvider(
        count: _count,
        incremnt: increment,
        child: Scaffold(
          appBar: AppBar(
            title: Text("BloC-1"),
          ),
          body: CounterTextWidgt(),
          floatingActionButton: ActionBarWidget(),
        ));
  }
}
